package pl.edu.pw.MidEmu.UI.Controllers;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import pl.edu.pw.MidEmu.Base.Controllers.BaseController;
import pl.edu.pw.MidEmu.Common.Consts;
import pl.edu.pw.MidEmu.UI.Views.GenericDataDisplayerView;

/**
 * Controller for displaynig generic data grid
 * @author Mateusz Starodab
 *
 */
public class GenericDataDisplayerController extends BaseController<GenericDataDisplayerView> implements ActionListener
{

	@Override
	public void actionPerformed(ActionEvent e)
	{
		if (e.getSource() instanceof JButton)
		{
			JButton button = (JButton) e.getSource();
			if (button.getName() == Consts.DataDisplayer_Close)
			{
				getView().close();
			}
		}

	}

}
